package member

import (
	"APT/internal/model/entity"
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/util/gmeta"
)

type GetUserInfoReq struct {
	g.Meta `path:"/member/info" method:"post" tags:"APP_MEMBER" summary:"用户信息_获取用户信息"`
}

type GetUserInfoRes struct {
	entity.PmsMember
	LevelInfo struct {
		gmeta.Meta `orm:"table:hg_pms_member_level"`
		entity.PmsMemberLevel
	} `json:"levelInfo" orm:"with:id=level"`
}

type BindEmailReq struct {
	g.Meta `path:"/member/bindEmail" method:"post" tags:"APP_MEMBER" summary:"用户信息_绑定邮箱"`
	Email  string `v:"required#邮箱未知" dc:"邮箱"`
	Code   string `v:"required#验证码未知" dc:"验证码"`
}
type BindEmailRes struct {
}

type BindPhoneReq struct {
	g.Meta `path:"/member/bindPhone" method:"post" tags:"APP_MEMBER" summary:"用户信息_绑定手机号"`
	Phone  string `v:"required#手机号未知" dc:"手机号"`
	AreaNo string `v:"required#手机国际区号未知" dc:"手机国际区号"`
	Code   string `v:"required#验证码未知" dc:"验证码"`
}

type BindPhoneRes struct {
}

type StaffInfoReq struct {
	g.Meta  `path:"/member/staffInfo" method:"post" tags:"APP_MEMBER" summary:"用户信息_获取员工信息"`
	StaffId int64 `v:"required#员工ID未知" dc:"员工ID"`
}

type StaffInfoRes struct {
	entity.PmsStaff
}

type ChannelInfoReq struct {
	g.Meta    `path:"/member/channelInfo" method:"post" tags:"APP_MEMBER" summary:"用户信息_获取渠道信息"`
	ChannelId int64 `v:"required#渠道ID未知" dc:"渠道ID"`
}

type ChannelInfoRes struct {
	entity.PmsChannel
}

type UserLevelRuleReq struct {
	g.Meta `path:"/member/levelRule" method:"post" tags:"APP_MEMBER" summary:"用户信息_获取会员权益规则"`
}

type UserLevelRuleRes struct {
	LevelRule string `json:"levelRule" dc:"会员权益规则"`
}

type EditUserInfoReq struct {
	g.Meta         `path:"/member/add_user_information" method:"post" tags:"APP_MEMBER" summary:"[用户]补全"`
	Sex            int    `json:"sex"               v:"in:1,2#性别错误" dc:"性别 1、男 2、女"`
	Avatar         string `json:"avatar"            v:"url#头像链接格式错误" dc:"头像 url上传之后返回的url"`
	FirstName      string `json:"first_name"        v:"" dc:"姓"`
	LastName       string `json:"last_name"         v:"" dc:"名"`
	FullName       string `json:"full_name"         v:"" dc:"全名"`
	Password       string `json:"password"          v:"password2|eq:RepeatPassword#密码长度在6~18之间,要求密码必须包含大小写字母和数字|密码不一致" dc:"密码"`
	RepeatPassword string `json:"repeatPassword"    v:"password2|eq:Password#重复密码长度在6~18之间,要求密码必须包含大小写字母和数字|密码不一致" dc:"重复密码"`
	Phone          string `json:"phone"             v:"" dc:"手机号"`
	AreaNo         string `json:"area_no"           v:"" dc:"手机国际区号"`
	Email          string `json:"email"             v:"email" dc:"邮箱"`
	Birthday       string `json:"birthday"          v:"date" dc:"生日"`
	Nationality    string `json:"nationality"       v:"" dc:"国家"`
	Address        string `json:"address"           v:"" dc:"地址"`
}

type EditUserInfoRes struct{}
